import nacos
import etcd3
import redis
import consul

# redis streams
GROUP_NAME = 'name_mapping_group'
CONSUMER_NAME = 'consumer_1'  # 多个进程可以用不同名字
REDIS_STREAM_KEY = 'name_mapping_update_stream'

# redis pub-sub
REDIS_PUB_SUB_CHANNEL = 'name_mapping_refresh'

# consul
CONSUL_KEY = "name_mapping/notify"

# etcd
NAME_MAPPING_WATCH_KEY = '/name_mapping/update'

# nacos
NACOS_SERVER_ADDRESSES = "localhost:8848"
NAMESPACE = "wanghongwei_local"
GROUP = "DEFAULT_GROUP"
DATA_ID = "name_mapping_update"
NACOS_USER_NAME = 'nacos'
NACOS_PASSWORD = 'nacos'

# nacos客户端
nacos_client = nacos.NacosClient(server_addresses=NACOS_SERVER_ADDRESSES, namespace=NAMESPACE, username=NACOS_USER_NAME,
                                 password=NACOS_PASSWORD)
# consul客户端
consul_client = consul.Consul(host='127.0.0.1', port=8500)
# etcd客户端
etcd_client = etcd3.client(host='127.0.0.1', port=2379)
# redis客户端
redis_client = redis.Redis(host='localhost', port=6379, db=0)
